<?php
$conn = new mysqli();
$conn->connect('127.0.0.1','root','123456','bank');
if(!empty($conn->connect_error)){
    echo 'MYSQL数据库连接错误 ';
    die;
}

//echo '数据库连接成功!<br/>';

$user=$_POST['user'];
$password=$_POST['password'];

$sql="select * from bankcard where CardNo='{$user}' and CardPwd='{$password}'";
$result=$conn->query($sql);
$row=mysqli_num_rows($result);
if ($row==1){
    echo '登录成功';
}else{
    echo '用户密码有误';
}
//if ($user=="admin" && $password=="123456"){
//    echo '登录成功';
//    die;
//}

